package com.simon.train.member.controller.feign;

import com.simon.train.common.Result.Result;
import com.simon.train.common.dto.MemberTicketDto;
import com.simon.train.member.service.TicketService;
import jakarta.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/feign/ticket")
public class FeignTicketController {

    @Autowired
    private TicketService ticketService;

    @PostMapping("/save")
    public Result<Object> save(@Valid @RequestBody MemberTicketDto req) throws Exception {
        ticketService.SaveTicket(req);
        return new Result<>();
    }

}
